<template>
  <div class='content'>
    <div class="header" >
       <van-icon name="arrow-left" size="30" color="#FFFFFF"  class="img1" @click="gos()"/>
      <p>关闭服务</p>
    </div>
    <div class="info">
      <img src="../assets/logo.png" alt="">
      <div class="title">是否关闭服务？</div>
      <div class="detail">关闭服务后您将不能享受二维码乘车服务</div>
    </div>
    <div class="btns">
      <van-button @click="register()">确认关闭</van-button>
      <van-button @click="gos()" style=" background:#fff;color:#333333">我再想想</van-button>
    </div>
  </div>
</template>

<script>
import {unregister} from "../api"
  export default {
    data(){
        return {
            show2:false
        }
    },
    methods: {
      register(){
        let user_id = localStorage.getItem("user_id")
        unregister(user_id)
        .then((res)=>{
          console.log(res);
          this.$router.push("/home")
        })
      },
      gos(){
      history.go(-1)
    }
    },
  }
</script>

<style lang="scss" scoped>
.content{
  font-family: PingFangSC-Regular, PingFang SC;
  height: 100vh;
  padding:18px 16px;
  box-sizing: border-box;
  background: linear-gradient(137deg, #318BFF 0%, #1876FF 100%);
  .textdialog{
    margin: 34px 0;
    text-align: center;
  }
  .header{
    display: flex; 
    .img1{
      width: 22px;
      height: 22px;
      margin: 12px 0 18px 15px;
    }
    p{
      height: 25px;
      font-size: 18px;
      font-family: PingFangSC-Medium, PingFang SC;
      font-weight: 250;
      color: #FFFFFF;
      line-height: 25px;
      margin: 12px 90px 18px 90px;
    }
  }
  .info{
    border-radius: 10px;
    background-color: #fff;
    padding:20px;
    .title{
      text-align: center;
      font-size: 16px;
      font-weight: 500;
      color: #333;
      padding:16px 0 9px 0;
    }
    .detail{
      text-align: center;
      font-size: 14px;
      font-weight: 400;
      color: #333;
    }
  }
  .btns{
    margin-top:15px;
    display: flex;
    justify-content: space-between;
    button{
      width:calc(50% - 7.5px);
      border-radius: 5px;
      border: 1px solid #fff;
      font-size: 16px;
      background: transparent;
      font-weight: 500;
      color: #fff;
    }
  }
}
</style>